//覆盖commentList中的setDisplay方法
let setOneCommentDisplay = function () {
    //this为commentList
    this._checkNodeTotal_forShowPreBorder();
    this.animateHeight(true, this._getHeightOfBottom());
    let commentButton = this.pareNode.querySelectorAll(".fa")[1],
        commentNum = this.pareNode.querySelector("span").innerText,
        bottom = this.pareNode.querySelector(".share-bottom"),
        that = this;
    if (commentNum[1] !== '0') {
        commentButton.onclick = function () {
            if (parseInt(bottom.style.height) !== 0) {
                that._checkNodeTotal_forShowPreBorder();
                that.animateHeight(false, that._getHeightOfBottom())
            } else {
                that._checkNodeTotal_forShowPreBorder();
                that.animateHeight(true, that._getHeightOfBottom())
            }
        };
    }
};
//单个节点显示方法
let OneShareAdjustScreen = function () {
    let nodeArr = [document.querySelectorAll(".cont")[0]],
        sharePare = getClass("right-inner")[0],
        length,
        width;
    width = sharePare.offsetWidth - 24 - 17;
    if (width > 446) {
        width = 446;
    }
    for (let i = 0; i < nodeArr.length; i++) {
        nodeArr[i].style.width = width + "px";
    }
};


/******************左侧模态框显示**********************/

/*** 以下为主方法 **/
let initRun=function () {
    //左边菜单栏
    FadeModelShowToWindow.init("resize");
    /*导航条的跳转方法*/
    let url = "/share/getDetail",
        shareId = parseURL(window.location.href).params.shareId,
        userId = parseURL(window.location.href).params.userId,
        data = {
            shareId: shareId,
            userId: userId
        },
        method = "POST",
        arrData = [];
    /*方法*/
    let shareArray = new shareArr(),
        length;
    shareArray.setPlayNode([getClass("one-cont cont")[0]]);
    ajax_base(data, url, method, "notJson").then(function (data) {
        arrData.push(data.obj);
        OneShareAdjustScreen();
        shareArray.showAllNode(arrData, 1, 1, false);
        let commentLi = new TotalComment(1, document.querySelector('.share'));
        commentLi.commentNodeList.ajax_getList().then(function (data) {
            commentLi.initTotal(data.obj);
            commentLi.showOneShare();
            commentLi.show("oneShare")
        })
    });
    tool.on(window,"resize",function () {
        clearTimeout(tool.timer);
        tool.timer=setTimeout(function () {
            OneShareAdjustScreen();
        },50);
    });
};
initRun()
